package com.cn.util;

import java.util.Scanner;

public class MyArray {
    public static void main(String[] args) {
//        Scanner scanner=new Scanner(System.in);
        int[] arr1 = {1, 34, 6};
        int sum = 0;
        int length = arr1.length;//优化
        for (int i = 0; i < length; i++) {
//            System.out.println(arr1[i]);
//            if (arr1[i] % 10 == 2)
            if (i == 1) {
                sum += arr1[i];
                continue;
            }
//            System.out.println(1);
        }
        System.out.println(sum);
        System.out.println(sum / (arr1.length * 1.0));
//        String aa="a";
//        aa.length();
//        System.out.println(arr1[0]);
//        System.out.println(arr1[1]);
//        System.out.println(arr1[2]);
//        int[] arr2 = new int[]{3, 5, 7};
//        System.out.println(arr2);
//        float[] arr3 = new float[]{1, 2, 3.3F, 5};
//        System.out.println(arr1);
//        System.out.println(arr2);
//        System.out.println(arr3);
//        System.out.println(args);
    }
}
